/**
 * @ClassDescription:
 * @JdkVersion: 1.8
 * @Author: 李白
 * @Created: 2024/4/9 18:59
 */
public class Stundent {
    private String name;
    private int age;

    public Stundent() {
        System.out.println("无参数的构造方法");
    }

    public Stundent(String name, int age) {
        this.name = name;
        this.age = age;
        System.out.println("有2个参数的构造方法");
    }
    public String getName(){//调用这个方法就返回对象的成员变量的值
        return this.name;
    }
    public void setName(String name){//给成员变量赋值
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void sleep(){

    }
}
